package com.googlecode.contests_repo.core.model;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;

import com.googlecode.contests_repo.annotation.ResourcePrivate;

/**
 * A representation of a contest problem.
 * 
 * @author joro, petko
 * 
 */
@JsonSerialize(include=Inclusion.NON_NULL)
public class Problem implements Resource {
	private String format;
	private String title;
	private String about;
	
	@ResourcePrivate
	private String[] authors;
	
	@ResourcePrivate
	private Double timeLimit;
	
	@ResourcePrivate
	private Integer memoryLimit;
	
	@ResourcePrivate
	private String origin;
	
	@ResourcePrivate
	private String notes;
	
	private Integer[] testWeights;
	
	@ResourcePrivate
	private String checker;

	/**
	 * Gets the problem json format.
	 * 
	 * @return the format
	 */
	public String getFormat() {
		return format;
	}

	/**
	 * Sets the problem json format.
	 * 
	 * @param format
	 *            the format to set
	 */
	public void setFormat(String format) {
		this.format = format;
	}

	/**
	 * Gets the problem title.
	 * 
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Sets the problem title.
	 * 
	 * @param title
	 *            the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * Gets the problem about section.
	 * 
	 * @return the about
	 */
	public String getAbout() {
		return about;
	}

	/**
	 * Sets the problem about section.
	 * 
	 * @param about
	 *            the about to set
	 */
	public void setAbout(String about) {
		this.about = about;
	}

	/**
	 * Gets the problem authors.
	 * 
	 * @return the authors
	 */
	public String[] getAuthors() {
		return authors;
	}

	/**
	 * Sets the problem authors.
	 * 
	 * @param authors
	 *            the authors to set
	 */
	public void setAuthors(String[] authors) {
		this.authors = authors;
	}

	/**
	 * Gets the problem time limit.
	 * 
	 * @return the timeLimit
	 */
	public Double getTimeLimit() {
		return timeLimit;
	}

	/**
	 * Sets the problem time limit.
	 * 
	 * @param timeLimit
	 *            the timeLimit to set
	 */
	public void setTimeLimit(Double timeLimit) {
		this.timeLimit = timeLimit;
	}

	/**
	 * Gets the problem memory limit.
	 * 
	 * @return the memoryLimit
	 */
	public Integer getMemoryLimit() {
		return memoryLimit;
	}

	/**
	 * Sets the problem memory limit.
	 * 
	 * @param memoryLimit
	 *            the memoryLimit to set
	 */
	public void setMemoryLimit(Integer memoryLimit) {
		this.memoryLimit = memoryLimit;
	}

	/**
	 * Gets the problem origin.
	 * 
	 * @return the origin
	 */
	public String getOrigin() {
		return origin;
	}

	/**
	 * Sets the problem origin.
	 * 
	 * @param origin
	 *            the origin to set
	 */
	public void setOrigin(String origin) {
		this.origin = origin;
	}

	/**
	 * Gets the problem notes.
	 * 
	 * @return the notes
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * Sets the problem notes.
	 * 
	 * @param notes
	 *            the notes to set
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	/**
	 * Sets the problem test weights.
	 * 
	 * @return the testWeights
	 */
	public Integer[] getTestWeights() {
		return testWeights;
	}

	/**
	 * Sets the problem test weights.
	 * 
	 * @param testWeights
	 *            the testWeights to set
	 */
	public void setTestWeights(Integer[] testWeights) {
		this.testWeights = testWeights;
	}

	/**
	 * Gets the problem checker file name.
	 * 
	 * @return the checker
	 */
	public String getChecker() {
		return checker;
	}

	/**
	 * Sets the problem checker file name.
	 * 
	 * @param checker
	 *            the checker to set
	 */
	public void setChecker(String checker) {
		this.checker = checker;
	}
}
